-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix restoring PDO::ATTR_ERRMODE after PDO::lastInsertId() call failed #1330
Fix restoring PDO::ATTR_ERRMODE after PDO::lastInsertId() call failed #1330
Conversation
mpyw
commented
Nov 17, 2021
•
edited
Loading
edited
- fixes PDO::ATTR_ERRMODE is implicitly changed to PDO::ERRMODE_SILENT after PDO::lastInsertId() call fails #1331
Codecov Report
@@ Coverage Diff @@
## dev #1330 +/- ##
=======================================
Coverage 83.43% 83.43%
=======================================
Files 22 22
Lines 7828 7829 +1
=======================================
+ Hits 6531 6532 +1
Misses 1297 1297 |
@yitam Hi! Where should I add new tests? |
Thanks @mpyw but we only accept PRs to |
@mpyw your change looks good. Thanks for catching this. For your test, it's similar to our existing test "pdo_lastInsertId.phpt", but your calls to To prove that your change has any effect, please put something like the following after one of the calls to
Also, change the catch block to be something like this:
|
@yitam Thanks! How do I confirm the actual message? |
@mpyw you don't have to match the exact message, but this is my suggestion (please drop the test tables first):
|